from pydantic import BaseModel
from pydantic.generics import GenericModel
from typing import Generic, TypeVar, Optional


T = TypeVar("T")


class Response(GenericModel, Generic[T]):
    code: int = 0
    message: str = "OK"
    data: Optional[T] = None


class UserOut(BaseModel):
    id: int
    name: str
    email: str


